<?php
/*
 * @Author: CHINAKAIYUAN<sunkaiyuan@namenode.cn>
 * @Date: 2022-03-10 23:27:20
 * @LastEditTime: 2023-11-11 10:29:17
 * @LastEditors: 孙开源 && sunkaiyuan@namenode.cn
 * @Description: 
 */

namespace App\Http\Validates\Comprehensive;

// Http\Validates\BaseData\CompanyValidate
class EmployeeValidate
    {
    public function save()
        {
        $rules    = [
            'name'            => "required",
            'phone'           => "required|mobile",
            'contactor_phone' => 'mobile',
            'department_id'   => "required",
            'position_id'     => "required"
        ];
        $messages = [
            'name.required'          => '参数错误,姓名必填',
            'department_id.required' => '参数错误,部门必选',
            'phone.required'         => '参数错误,电话必填',
            'phone.mobile'           => "参数错误,电话错误",
            'contactor_phone.mobile' => "参数错误,联系人电话错误",
            'position_id.required'   => '参数错误,岗位必填',
        ];
        return [$rules, $messages];
        }
    }